#ifndef ADMIN_H
#define ADMIN_H

#include <QDialog>
#include<QSqlTableModel>
#include<QMessageBox>
#include"admin_edit.h"
#include"caredit.h"
#include"stopinfo.h"
#include<QSqlError>
#include <QLayout>
#include <QLayoutItem>
#include <QTimer>
#include <qdatetime.h>
#include<QPaintEvent> //用于绘画事件
#include<QtGui> //引入用到的控件
#include<baobiao_form.h>
namespace Ui {
class admin;
}

class admin : public QDialog
{
    Q_OBJECT

public:
    explicit admin(QWidget *parent = 0);
    ~admin();
    void printinfo(QString user_id, QString name, QString flag, QString carid, QString phone, QString email, QString register_time,QString fare,QString username);
    void info_flush();
    void stopcx();
    void stopcx1();
    void stopinfoedit();
    void timerUpdate();
    void printstop(QDateTime statime,QDateTime endtime);
    void printstop1(QString parkingname);
    void updatestop(QString placeid,QString statusid);
    void stopinfocx();
    void paint();

signals:
    void send_show_login();//退出返回到登录界面信号
    void send_info_flush();//更新信息信号
    void send_main_stopcx(QDateTime, QDateTime);
    void send_main_stopcx1(QString);
    void send_main_stopinfoedit(QString,QString);
    void send_main_stopinfocx();


private slots:

    void on_pushButton_22_clicked();//汽车表刷新

    void on_pushButton_19_clicked();//全部查询

    void on_pushButton_18_clicked();//选择查询

    void on_pushButton_6_clicked();//退出

    void on_pushButton_17_clicked();

    void on_pushButton_23_clicked();

    void on_pushButton_20_clicked();

    void on_pushButton_21_clicked();

    void on_pushButton_24_clicked();

    void on_pushButton_15_clicked();



    void on_pushButton_10_clicked();

    void on_pushButton_clicked();



    void on_pushButton_62_clicked();


    void on_regular_clicked();

    void on_pushButton_16_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_5_clicked();

private:
    Ui::admin *ui;
    QString user;
    QString flag="管理员";
    admin_edit admin_edit1;
    caredit caredit2;
    QImage image;
    QSqlQuery query;
    stopinfo stopinfo1;
    baobiao_form form;
protected:
    void paintEvent(QPaintEvent *){
        QPainter painter(this);
        painter.drawImage(0,0,image);
    }
};

#endif // ADMIN_H
